package com.maoxx.stuchoosemssbv_service.mapper;

import com.maoxx.stuchoosemssbv_service.entity.Course;
import com.maoxx.stuchoosemssbv_service.entity.CourseTeacher;
import com.maoxx.stuchoosemssbv_service.entity.CourseTeacherInfo;
import com.maoxx.stuchoosemssbv_service.entity.CourseTeacherRowsDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseTeacherMapper {
    @Delete("DELETE FROM studentms.ct WHERE cid = #{c.cid} AND tid = #{c.tid}")
    public boolean deleteById(@Param("c") CourseTeacherRowsDTO courseTeacherRowsDTO);

    List<CourseTeacherInfo> findCourseTeacherInfo();

    public List<Course> findMyCourse(@Param("tid") Integer tid,
                                     @Param("term") String term);
}
